package com.tio.showcaseclient.controller;

import com.tio.showcaseclient.client.ShowcaseClientStarter;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("client")
public class MsgController {

    @GetMapping("/send")
    public String send(@RequestParam("line") String line) throws Exception {
        ShowcaseClientStarter.processCommand(line);
        return "send ok";
    }
}
